package com.ra.landlord;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Where;

import com.ra.system.Version;

/**
 * 
 * 房屋配置： 比方热水器，空调，沙发等
 * 
 * FIXME: tballrelation 重构
 * Brand_specifications, user_id
 * 
 * @author Jerry
 *
 */
@Entity
@Table(name = "ra_roomitemcfg")
@Where(clause = "data_status = 1")
public class RoomItemCfg implements Version {

	private Integer id;
	
	private String name;
	
	private String remark;
	
	private Integer number;
	
	private String acquisitionTime;
	
	private String allocationTime;
	
	// 品牌规格
	private String specification;
	
	private BigDecimal price;
	
	// 物品采购人员
	private LandlordUser buyer;
	
	private LandlordOwnerUser landlordUser;
	
	private Integer version;
	
	private Integer status;
	
	@Id
	@GeneratedValue
	@Column(name = "FigurationId")
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "Figurationname")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "Remarks")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "Number")
	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	@Column(name = "Acquisition_time")
	public String getAcquisitionTime() {
		return acquisitionTime;
	}

	public void setAcquisitionTime(String acquisitionTime) {
		this.acquisitionTime = acquisitionTime;
	}

	@Column(name = "Allocation_time")
	public String getAllocationTime() {
		return allocationTime;
	}

	public void setAllocationTime(String allocationTime) {
		this.allocationTime = allocationTime;
	}
	
	@Column(name = "Brand_specifications")
	public String getSpecification() {
		return specification;
	}

	public void setSpecification(String specification) {
		this.specification = specification;
	}

	@Column(name = "Prize")
	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "user_id")
	public LandlordUser getBuyer() {
		return buyer;
	}

	public void setBuyer(LandlordUser buyer) {
		this.buyer = buyer;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "createuserid")
	public LandlordOwnerUser getLandlordUser() {
		return landlordUser;
	}

	public void setLandlordUser(LandlordOwnerUser landlordUser) {
		this.landlordUser = landlordUser;
	}
	
	@Column(name = "version_id")
	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}
	
	@Column(name = "data_status")
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
}
